import request from '@/utils/request.js'

// mock的axios副本
import mockRequest from '@/mock/mockRequest.js'

// 首页三级分类
const getBaseCategoryList = () => {
  return request({
    url: '/api/product/getBaseCategoryList'
  })
}

// 获取轮播图数据
const getMockBannerList = () => {
  return mockRequest({
    url: '/banner'
  })
}

// 获取FLoor轮播图数据
const getMockFloorList = () => {
  return mockRequest({
    url: '/floor'
  })
}

// 获取搜索商品的信息
const getSearchInfo = (data) => {
  return request({
    url: '/api/list',
    method: 'post',
    data
  })
}

export {
  getBaseCategoryList,
  getMockBannerList,
  getMockFloorList,
  getSearchInfo
}
